
const CONSTANT = {
  PORT: 5757
}

module.exports = {
  // source path
  publicPath: '/',
  dist: 'dist',
  entry: [{
    name: 'main',
    title: '主页面',
    html: 'index',
    platform: 'mobile'
  }, {
    name: 'sub',
    title: '副业面',
    html: 'index'
  }],

  // server
  server: {
    port: CONSTANT.PORT,
    host: 'localhost',
    showDash: false,
    proxy: {
      '/api': {
        target: `http://localhost:${CONSTANT.PORT}`,
        pathRewrite: {'^/api' : '/data'},
        secure: false
      }
    },
    before: function(app, server, compiler) {
      // console.log(server);
    }
  },

  // environment
  DEV: {
    DEBUG: true,
    ENV: 'DEV',
    API: ''
  },
  TEST: {
    DEBUG: true,
    ENV: 'TEST',
    API: ''
  },
  PRO: {
    DEBUG: false,
    ENV: 'PRO',
    API: ''
  }
}